<div class="b3modal">
  <div class="b3modal-background" ng-click="go('editor');"></div>
  <div class="b3modal-window">
    <form name="nodeForm" ng-submit="editnode.save()" class="full-height">
      <div class="b3modal-wrap">
        <h1 class="b3modal-title">{{editnode.action}} node</h1>
        <div class="b3modal-content">
          
            <div class="row">
              <div class="form-group col-md-4" ng-class="{'has-error':nodeForm.name.$invalid && nodeForm.name.$dirty}">
                <label for="name" class="control-label">Name</label>
                <input type="text"
                       class="form-control"
                       name="name"
                       ng-model="editnode.node.name"
                       tooltip="{{nodeForm.name.$error.blacklist?'Node already exists':''}}"
                       tooltip-placement="bottom"
                       tooltip-trigger="keyup"
                       blacklist="{{editnode.blacklist}}"
                       required
                       autofocus>
                       <!-- tooltip-enable="!inputModel"  -->
              </div>

              <div class="form-group col-md-4">
                <label for="title" class="control-label">Title</label>
                <input type="text"
                       class="form-control"
                       name="title"
                       ng-model="editnode.node.title">
              </div>

              <div class="form-group col-md-4">
                <label for="category" class="control-label">Category</label>
                <select class="form-control" 
                        ng-model="editnode.node.category"
                        ng-disabled="editnode.original">
                  <option value="composite">Composite</option>
                  <option value="decorator">Decorator</option>
                  <option value="action">Action</option>
                  <option value="condition">Condition</option>
                </select>
              </div>
            </div>

            <div class="row">
              <div class="form-group col-md-6">
                <label for="description" class="control-label">Description</label>
                <textarea name="description" class="form-control" rows="14" ng-model="editnode.node.description"></textarea>
              </div>

              <div class="form-group col-md-6">
                <b3-key-table heading="Properties" ng-model="editnode.node.properties"></b3-key-table>
              </div> 
            </div>

        </div>
      </div>

      <div class="b3modal-buttons">
        <input type="button" class="btn btn-danger btn-lg pull-left" ng-click="editnode.remove()" value="Remove" ng-show="editnode.original">
        
        <input type="button" class="btn btn-default btn-lg" ui-sref="editor" value="Cancel">
        <button type="submit" class="btn btn-success btn-lg" ng-disabled="nodeForm.name.$invalid">Save</button>
      </div>
    </form>
  </div>
</div>